import http from "@/api";

import { ResPage } from "@/api/interface";

import { DealerCashEntity, DealerCashVo } from "@/biz/interface/modules/DealerCashType";

import { ModuleFlexJobUrl } from "..";

const moduleUrl = ModuleFlexJobUrl;

// * 获取dealerCash列表
export const getDealerCashVoListApi = (params: {}) => {
  return http.post<ResPage<DealerCashVo>>(moduleUrl + `/dealwalletapi/cashapplys`, params);
};

// * 新增dealerCash接口
export const saveDealerCashApi = (dealerCash: DealerCashEntity) => {
  return http.post(moduleUrl + `/dealwalletapi/cashapply`, dealerCash);
};

// * 详情dealerCash接口
export const getDealerCashInfoApi = (params: { id: string }) => {
  return http.post<DealerCashEntity>(moduleUrl + `/dealwalletapi/cashapplyinfo`, params);
};

// * 删除dealerCash接口
export const deleteDealerCashApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/dealwalletapi/rmcashapply`, params);
};
